<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    function isYear (year) {
        var flag =  false;
        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
            flag = true;
        }
        return flag;
    }
    console.log(isYear(1999));
</script>
<body>

</body>
</html>